const douban=require("../../libraries/douban.js");
Page({
  data:{
    movies:[],
    loading:true
  },
  onLoad:function(options){
    // 页面初始化 options为页面跳转所带来的参数
    douban.find('coming_soon',1,3)
          .then(d=>{
              this.setData({movies:d.subjects,loading:false});
              console.log(this.data);
              })
          .catch(e=>{
              console.error(e)
              this.setData({movies:[],loading:false});
              });
          
    //查询将要上映的前三个电影
  },
 start:function(){
   wx.redirectTo({url:"../board/board"});
 }
})